<template>
  <!-- 单色svg -->
  <svg class='icon' :class='class' :viewBox='viewBox' version='1.1' xmlns='http://www.w3.org/2000/svg' :width='width'
       :height='height'>
    <path v-for='(path, index) in nowPath' :key='index' :d='path' :fill='fill' />
  </svg>
</template>

<script setup lang='ts'>
const emit = defineEmits(['event']);
const props = defineProps({
  width: {
    default: 64,
    type: Number
  },
  height: {
    default: 64,
    type: Number
  },
  fill: {
    default: 'rgb(210, 210, 210)',
    type: String
  },
  class: {
    default: '',
    type: String
  },
  name: {
    default: '',
    type: String
  },
  viewBox: {
    default: '0 0 1024 1024',
    type: String
  }
});

const paths = [
  {
    k: 'chat-history',
    v: ['M512 85.271273a426.635636 426.635636 0 0 1 426.635636 426.682182A426.682182 426.682182 0 0 1 512 938.589091 426.682182 426.682182 0 0 1 85.317818 512h85.317818a341.364364 341.364364 0 1 0 59.112728-192h111.569454v85.317818h-256v-256h85.317818v106.682182A425.844364 425.844364 0 0 1 512 85.271273z m42.635636 213.317818v195.630545l138.379637 138.379637-60.369455 60.369454-163.328-163.374545V298.542545h85.317818z']
  },
  {
    k: 'pointer',
    v: [
      'M341.333333 512a85.333333 85.333333 0 1 1-170.666666 0 85.333333 85.333333 0 0 1 170.666666 0z m256 0a85.333333 85.333333 0 1 1-170.666666 0 85.333333 85.333333 0 0 1 170.666666 0z m170.666667 85.333333a85.333333 85.333333 0 1 0 0-170.666666 85.333333 85.333333 0 0 0 0 170.666666z'
    ]
  },
  {
    k: 'emoji',
    v: [
      'M512 992C247.3 992 32 776.7 32 512S247.3 32 512 32s480 215.3 480 480-215.3 480-480 480z m0-896C282.6 96 96 282.6 96 512s186.6 416 416 416 416-186.6 416-416S741.4 96 512 96z',
      'M512 800c-78 0-151.1-30.7-205.7-86.5C253.2 659.4 224 587.8 224 512c0-17.7 14.3-32 32-32h512c17.7 0 32 14.3 32 32 0 75.8-29.2 147.4-82.3 201.5C663.1 769.3 590 800 512 800zM352 668.8c42.5 43.4 99.3 67.2 160 67.2s117.5-23.9 160-67.2c33.7-34.4 55-77.9 61.7-124.8H290.3c6.6 46.9 28 90.3 61.7 124.8zM368 416c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zM656 416c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z'
    ]
  },
  {
    k: 'up-image',
    v: [
      'M268.91 339.07m-87.37 0a87.37 87.37 0 1 0 174.74 0 87.37 87.37 0 1 0-174.74 0Z',
      'M857.66 61.17H167.21C75.35 61.17 0.88 135.64 0.88 227.51v466.27a40.979 40.979 0 0 0 0 16.87v85.85c0 91.86 74.47 166.34 166.34 166.34h690.45c91.86 0 166.34-74.47 166.34-166.34V227.51c0-91.86-74.47-166.34-166.34-166.34z m-690.45 81.89h690.45c46.57 0 84.45 37.88 84.45 84.45v349.44l-107.07-106.2c-29.58-29.34-68.81-45.61-110.47-45.83-41.63-0.21-81.06 15.65-110.94 44.68L427.57 650.33l-104.36-66a157.9 157.9 0 0 0-83.53-24.47c-29.59-0.17-58.6 7.94-83.82 23.47l-73.1 45.01V227.51c0-46.57 37.88-84.45 84.45-84.45z m690.45 737.89H167.21c-46.57 0-84.45-37.88-84.45-84.45v-72l116.03-71.45c24.59-15.14 56.24-14.95 80.64 0.48l131.63 83.24c15.99 10.12 36.84 7.95 50.41-5.23l209.21-203.21c29.57-28.72 77.43-28.47 106.7 0.56l164.74 163.39V796.5c0 46.57-37.88 84.45-84.45 84.45z'
    ]
  },
  {
    k: 'no-user',
    v: [
      'M1.32129 363.800774h10.619871c18.597161 0 33.197419-14.914065 33.19742-33.891097v-10.83458H62.430968v10.83458c0 28.45729-22.577548 51.49729-50.473291 51.497291H2.659097l-1.321291-17.606194zM980.067097 881.465806h73.034322c9.298581 0 13.278968 4.079484 13.278968 13.543226 0 9.496774-3.980387 13.559742-13.278968 13.559742H980.067097c-9.298581 0-13.278968-4.062968-13.278968-13.543226s3.980387-13.543226 13.278968-13.543225zM21.239742 995.311484H94.307097c9.298581 0 13.278968 4.062968 13.278968 13.543226 0 9.496774-3.980387 13.543226-13.278968 13.543225H21.239742c-9.298581 0-13.278968-4.046452-13.278968-13.543225 0-9.480258 5.318194-13.543226 13.278968-13.543226z m845.939613-54.205936H1118.141935c9.298581 0 13.278968 4.062968 13.278968 13.543226 0 9.496774-3.980387 13.543226-13.278968 13.543226H867.179355c-9.298581 0-13.278968-4.046452-13.278968-13.543226 0-8.125935 5.301677-13.543226 13.278968-13.543226zM160.685419 995.311484h250.995613c9.298581 0 13.278968 4.062968 13.278968 13.543226 0 9.496774-3.980387 13.543226-13.278968 13.543225H160.685419c-9.298581 0-13.278968-4.046452-13.278967-13.543225 0-9.480258 3.980387-13.543226 13.278967-13.543226zM1098.24 736.454194a19.75329 19.75329 0 0 1-19.918452-20.314839c0-10.851097 7.960774-20.347871 19.918452-20.347871 10.619871 0 19.918452 8.125935 19.918452 20.331355 0 10.834581-9.298581 20.314839-19.918452 20.314838z m0-60.994065c-21.239742 0-39.836903 17.62271-39.836903 40.66271 0 21.685677 17.259355 40.646194 39.836903 40.646193 21.256258 0 39.836903-17.606194 39.836903-40.629677 0-23.056516-17.259355-40.679226-39.836903-40.679226zM973.411097 88.691613c18.597161 0 33.197419 14.897548 33.197419 33.874581s-14.600258 33.874581-33.197419 33.87458c-9.298581 0-17.259355-4.062968-23.898839-9.480258-6.639484-6.771613-9.298581-14.914065-9.298581-24.394322 0-18.977032 14.600258-33.874581 33.19742-33.874581z m0 93.514322c33.197419 0 59.755355-27.102968 59.755355-60.994064 0-33.874581-26.557935-60.994065-59.755355-60.994065s-59.755355 27.119484-59.755355 60.994065c0 35.228903 26.557935 60.994065 59.755355 60.994064zM529.837419 41.25729c0-10.834581 9.298581-20.314839 19.934968-20.314838 10.619871 0 19.918452 9.480258 19.918452 20.314838s-9.298581 20.314839-19.918452 20.314839c-10.636387 0-19.934968-9.480258-19.934968-20.314839z m59.788387 0c0-23.04-17.275871-40.66271-39.853419-40.662709-22.577548 0-39.836903 17.62271-39.836903 40.662709 0 23.04 17.259355 40.66271 39.836903 40.66271S589.625806 64.29729 589.625806 41.25729z m419.625291 260.195097a9.166452 9.166452 0 0 0-9.298581-9.480258 9.166452 9.166452 0 0 0-9.298581 9.480258v20.331355h-19.918451a9.166452 9.166452 0 0 0-9.298581 9.480258c0 5.41729 3.996903 9.496774 9.298581 9.496774h19.918451v20.314839c0 5.433806 3.996903 9.496774 9.298581 9.496774a9.166452 9.166452 0 0 0 9.298581-9.496774v-20.314839h19.918451a9.166452 9.166452 0 0 0 9.298581-9.496774 9.166452 9.166452 0 0 0-9.298581-9.480258h-19.918451v-20.331355z m-610.865549-97.57729h27.879226v31.182451c0 8.125935 6.639484 14.897548 13.278968 14.897549 7.97729 0 13.278968-6.771613 13.278968-14.897549v-31.182451h27.895742c7.960774 0 13.278968-6.771613 13.278967-14.914065 0-8.125935-6.639484-14.897548-13.278967-14.897548h-27.895742V142.897548c0-8.125935-6.639484-14.914065-13.278968-14.914064-7.97729 0-13.278968 6.771613-13.278968 14.914064v31.165936h-27.879226c-7.97729 0-13.295484 6.771613-13.295483 14.897548 0 8.142452 6.656 14.914065 13.295483 14.914065z',
      'M1.32129 362.429935h10.619871c26.574452 0 50.47329 23.04 50.473291 51.497291v10.851097H45.155097V413.91071c0-18.960516-14.616774-33.874581-33.19742-33.874581H0l1.32129-17.62271zM106.248258 380.052645H95.628387c-26.557935 0-50.456774-23.04-50.456774-51.49729V317.704258h17.259355v10.851097c0 18.977032 14.600258 33.874581 33.197419 33.87458h11.957678l-1.321291 17.62271z',
      'M63.554065 412.903226H49.548387v-8.62142C49.548387 382.744774 67.864774 363.354839 90.475355 363.354839H99.096774v14.005677h-8.621419c-15.079226 0-26.92129 11.842065-26.92129 26.92129V412.903226z',
      'M532.513032 646.672516a15.789419 15.789419 0 0 1-6.375226-1.337806c-49.498839-21.669161-81.474065-71.630452-81.474064-127.289807 0-76.188903 59.854452-138.173935 133.41729-138.173935 73.546323 0 133.384258 61.985032 133.384258 138.173935 0 53.941677-30.620903 103.275355-78.005677 125.704258a16.185806 16.185806 0 0 1-21.71871-8.357161c-3.765677-8.538839-0.132129-18.613677 8.092903-22.494968 35.757419-16.929032 58.846968-54.172903 58.846968-94.852129 0-57.476129-45.138581-104.216774-100.599742-104.216774-55.494194 0-100.632774 46.740645-100.632774 104.216774 0 41.984 24.113548 79.673806 61.44 96.024774 8.340645 3.633548 12.254968 13.60929 8.720516 22.247226a16.384 16.384 0 0 1-15.095742 10.355613',
      'M664.955871 875.354839h-0.016516L381.522581 875.107097c-17.870452-0.033032-34.122323-8.588387-43.503484-22.891355a45.997419 45.997419 0 0 1-3.022452-45.650581C359.853419 755.216516 424.993032 668.721548 581.995355 666.392774c161.395613-2.85729 220.093935 89.781677 240.72258 144.962065a45.089032 45.089032 0 0 1-6.028387 42.875871c-9.579355 13.245935-25.451355 21.140645-42.429935 21.140645h-40.926968c-9.067355 0-16.417032-7.101935-16.417032-15.855484 0-8.786581 7.349677-15.888516 16.417032-15.888516h40.926968c6.276129 0 12.089806-2.85729 15.57471-7.613936a14.534194 14.534194 0 0 0 2.014967-13.873548C770.312258 764.449032 715.941161 695.989677 582.523871 698.103742c-132.211613 1.981935-191.421935 67.385806-217.798194 121.905548a15.06271 15.06271 0 0 0 0.990968 15.178323c3.352774 5.086968 9.282065 8.142452 15.855484 8.158968l283.400258 0.247742c9.050839 0.016516 16.384 7.101935 16.384 15.888516 0 8.753548-7.349677 15.855484-16.400516 15.855484'
    ]
  },
  {
    k: 'system-dark',
    v: [
      'M525.963636 93.090909c225.745455 6.981818 404.945455 193.163636 404.945455 418.909091 0 230.4-188.509091 418.909091-418.909091 418.909091-174.545455 0-323.490909-107.054545-386.327273-256H139.636364c230.4 0 418.909091-188.509091 418.909091-418.909091 0-58.181818-11.636364-111.709091-32.581819-162.909091m0-93.090909c-30.254545 0-58.181818 13.963636-76.8 39.563636-18.618182 25.6-20.945455 60.509091-9.309091 88.436364 16.290909 41.890909 25.6 83.781818 25.6 128 0 179.2-146.618182 325.818182-325.818181 325.818182h-11.636364-2.327273c-30.254545 0-58.181818 13.963636-76.8 39.563636-18.618182 25.6-20.945455 60.509091-9.309091 88.436364C121.018182 900.654545 304.872727 1024 512 1024c281.6 0 512-230.4 512-512C1024 235.054545 807.563636 9.309091 528.290909 0h-2.327273z'
    ]
  },
  {
    k: 'system-light',
    v: [
      'M507.2 288c123.2 0 224 100.8 224 224s-100.8 224-224 224-224-100.8-224-224 99.2-224 224-224m0-64c-158.4 0-288 129.6-288 288s129.6 288 288 288 288-129.6 288-288-129.6-288-288-288z m4.8-48c17.6 0 32-14.4 32-32V48c0-17.6-14.4-32-32-32s-32 14.4-32 32v96c0 17.6 14.4 32 32 32z m0 832c17.6 0 32-14.4 32-32v-96c0-17.6-14.4-32-32-32s-32 14.4-32 32v96c0 17.6 14.4 32 32 32zM176 512c0-17.6-14.4-32-32-32H48c-17.6 0-32 14.4-32 32s14.4 32 32 32h96c17.6 0 32-14.4 32-32z m832 0c0-17.6-14.4-32-32-32h-96c-17.6 0-32 14.4-32 32s14.4 32 32 32h96c17.6 0 32-14.4 32-32zM273.6 273.6c12.8-12.8 12.8-33.6 0-44.8l-67.2-67.2c-12.8-12.8-33.6-12.8-44.8 0-12.8 12.8-12.8 33.6 0 44.8l67.2 67.2c12.8 12.8 33.6 12.8 44.8 0z m588.8 588.8c12.8-12.8 12.8-33.6 0-44.8l-67.2-67.2c-12.8-12.8-33.6-12.8-44.8 0-12.8 12.8-12.8 33.6 0 44.8l67.2 67.2c12.8 12.8 32 12.8 44.8 0zM275.2 748.8c-12.8-12.8-33.6-12.8-44.8 0L163.2 816c-12.8 12.8-12.8 33.6 0 44.8 12.8 12.8 33.6 12.8 44.8 0l67.2-67.2c11.2-11.2 11.2-32 0-44.8z m587.2-587.2c-12.8-12.8-33.6-12.8-44.8 0l-67.2 67.2c-12.8 12.8-12.8 33.6 0 44.8 12.8 12.8 33.6 12.8 44.8 0l67.2-67.2c12.8-12.8 12.8-32 0-44.8z'
    ]
  },
  {
    k: 'github',
    v: [
      'M256 32C132.3 32 32 134.9 32 261.7c0 101.5 64.2 187.5 153.2 217.9a17.56 17.56 0 0 0 3.8.4c8.3 0 11.5-6.1 11.5-11.4c0-5.5-.2-19.9-.3-39.1a102.4 102.4 0 0 1-22.6 2.7c-43.1 0-52.9-33.5-52.9-33.5c-10.2-26.5-24.9-33.6-24.9-33.6c-19.5-13.7-.1-14.1 1.4-14.1h.1c22.5 2 34.3 23.8 34.3 23.8c11.2 19.6 26.2 25.1 39.6 25.1a63 63 0 0 0 25.6-6c2-14.8 7.8-24.9 14.2-30.7c-49.7-5.8-102-25.5-102-113.5c0-25.1 8.7-45.6 23-61.6c-2.3-5.8-10-29.2 2.2-60.8a18.64 18.64 0 0 1 5-.5c8.1 0 26.4 3.1 56.6 24.1a208.21 208.21 0 0 1 112.2 0c30.2-21 48.5-24.1 56.6-24.1a18.64 18.64 0 0 1 5 .5c12.2 31.6 4.5 55 2.2 60.8c14.3 16.1 23 36.6 23 61.6c0 88.2-52.4 107.6-102.3 113.3c8 7.1 15.2 21.1 15.2 42.5c0 30.7-.3 55.5-.3 63c0 5.4 3.1 11.5 11.4 11.5a19.35 19.35 0 0 0 4-.4C415.9 449.2 480 363.1 480 261.7C480 134.9 379.7 32 256 32z'
    ]
  },
  {
    k: 'message-fail',
    v: [
      'M512 128c212 0 384 172 384 384s-172 384-384 384-384-172-384-384 172-384 384-384m0-64C264.8 64 64 264.8 64 512s200.8 448 448 448 448-200.8 448-448S759.2 64 512 64z',
      'M480 704h64v64h-64zM480 256h64v384h-64z'
    ]
  },
  {
    k: 'message-loading',
    v: ['M512 64c247.2 0 448 200.8 448 448h-64c0-212-172-384-384-384V64z m0 832c-212 0-384-172-384-384H64c0 247.2 200.8 448 448 448v-64z']
  },
  {
    k: 'close',
    v: [
      'M512 0a512 512 0 1 1 0 1024A512 512 0 0 1 512 0z m0 96a416 416 0 1 0 0 832 416 416 0 0 0 0-832z m34.944 196.736a48 48 0 0 1 62.976 4.288l4.288 4.928a48 48 0 0 1-4.288 62.976L462.848 512l147.072 147.072 4.288 4.928a48 48 0 0 1-72.128 62.976L327.04 512l215.04-214.976z'
    ]
  },
  {
    k: 'open',
    v: [
      'M0 512c0 282.331429 229.668571 512 512 512s512-229.668571 512-512-229.668571-512-512-512-512 229.668571-512 512z m938.642286 0A427.154286 427.154286 0 0 1 512 938.642286 427.154286 427.154286 0 0 1 85.357714 512 427.154286 427.154286 0 0 1 512 85.357714 427.154286 427.154286 0 0 1 938.642286 512zM384 682.642286a42.642286 42.642286 0 0 0 72.630857 30.427428l170.642286-168.301714a42.642286 42.642286 0 0 0 0.438857-60.342857L457.069714 311.369143a42.642286 42.642286 0 1 0-60.781714 59.977143l140.726857 142.701714-140.288 138.313143a42.349714 42.349714 0 0 0-12.726857 30.281143z'
    ]
  },
  {
    k: 'del',
    v: [
      'M736.653061 929.959184H287.346939c-45.97551 0-83.591837-37.616327-83.591837-83.591837V355.265306h616.489796v491.102041c0 45.97551-37.616327 83.591837-83.591837 83.591837zM245.55102 397.061224v449.306123c0 22.987755 18.808163 41.795918 41.795919 41.795918h449.306122c22.987755 0 41.795918-18.808163 41.795919-41.795918V397.061224H245.55102z',
      'M407.510204 794.122449c-11.493878 0-20.897959-9.404082-20.897959-20.897959V512c0-11.493878 9.404082-20.897959 20.897959-20.897959s20.897959 9.404082 20.897959 20.897959v261.22449c0 11.493878-9.404082 20.897959-20.897959 20.897959zM616.489796 794.122449c-11.493878 0-20.897959-9.404082-20.897959-20.897959V512c0-11.493878 9.404082-20.897959 20.897959-20.897959s20.897959 9.404082 20.897959 20.897959v261.22449c0 11.493878-9.404082 20.897959-20.897959 20.897959z',
      'M846.367347 397.061224H177.632653c-45.97551 0-83.591837-37.616327-83.591837-83.591836v-31.346939c0-45.97551 37.616327-83.591837 83.591837-83.591837h668.734694c45.97551 0 83.591837 37.616327 83.591837 83.591837v31.346939c0 45.97551-37.616327 83.591837-83.591837 83.591836zM177.632653 240.326531c-22.987755 0-41.795918 18.808163-41.795918 41.795918v31.346939c0 22.987755 18.808163 41.795918 41.795918 41.795918h668.734694c22.987755 0 41.795918-18.808163 41.795918-41.795918v-31.346939c0-22.987755-18.808163-41.795918-41.795918-41.795918H177.632653z',
      'M650.44898 240.326531h-276.89796c-28.734694 0-52.244898-23.510204-52.244898-52.244898v-41.795919c0-28.734694 23.510204-52.244898 52.244898-52.244898h276.89796c28.734694 0 52.244898 23.510204 52.244898 52.244898v41.795919c0 28.734694-23.510204 52.244898-52.244898 52.244898z m-276.89796-104.489796c-5.746939 0-10.44898 4.702041-10.448979 10.448979v41.795919c0 5.746939 4.702041 10.44898 10.448979 10.448979h276.89796c5.746939 0 10.44898-4.702041 10.448979-10.448979v-41.795919c0-5.746939-4.702041-10.44898-10.448979-10.448979h-276.89796z'
    ]
  },
  {
    k: 'cancel',
    v: [
      'M510.65 963C264.6 963 63.3 761.26 63.3 514.7S264.6 66.41 510.65 66.41 958 268.14 958 514.7 756.69 963 510.65 963zM655 858.61a377.28 377.28 0 0 0 198.65-199.12 371.82 371.82 0 0 0 0-289.58A377.18 377.18 0 0 0 655 170.79a369.15 369.15 0 0 0-288.64 0 377.09 377.09 0 0 0-198.71 199.12 371.82 371.82 0 0 0 0 289.58A377.12 377.12 0 0 0 366.33 858.6a369.21 369.21 0 0 0 288.64 0z',
      'M287.806909 685.824011m26.516505-26.516504l349.31075-349.31075q26.516504-26.516504 53.033008 0l0 0q26.516504 26.516504 0 53.033008l-349.31075 349.31075q-26.516504 26.516504-53.033008 0l0 0q-26.516504-26.516504 0-53.033008Z',
      'M686.881618 742.132969m-26.516505-26.516504l-349.31075-349.31075q-26.516504-26.516504 0-53.033008l0 0q26.516504-26.516504 53.033009 0l349.31075 349.310749q26.516504 26.516504 0 53.033009l0 0q-26.516504 26.516504-53.033009 0Z'
    ]
  }
];
const nowPath = ref([] as string[]);
onMounted(() => {
  for (let i = 0; i < paths.length; i++) {
    if (paths[i].k === props.name) {
      nowPath.value = paths[i].v;
      break;
    }
  }
});
</script>

<style lang='scss' scoped></style>
